package com.bjsxt.livegoods.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 用户
 */
public class User implements Serializable {
    public String id;
    private String phone;//手机号
    private String yzm;//验证码，有效事成 5分钟
    private Date expire;//有效时间，验证码的有效时间

    public User() {
    }

    public User(String id, String phone, String yzm, Date expire) {
        this.id = id;
        this.phone = phone;
        this.yzm = yzm;
        this.expire = expire;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", phone='" + phone + '\'' +
                ", yzm='" + yzm + '\'' +
                ", expire=" + expire +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(phone, user.phone) && Objects.equals(yzm, user.yzm) && Objects.equals(expire, user.expire);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, phone, yzm, expire);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getYzm() {
        return yzm;
    }

    public void setYzm(String yzm) {
        this.yzm = yzm;
    }

    public Date getExpire() {
        return expire;
    }

    public void setExpire(Date expire) {
        this.expire = expire;
    }
}
